<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>评论管理-个人中心-魔步网</title>
<?php include_once(VIEWPATH."public/header_title.php");?>
<link href="<?php echo _get_cfg_path('css')?>base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('css')?>common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('lib')?>uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="<?php echo _get_cfg_path('js')?>DD_belatedPNG.js" type="text/javascript" ></script>
<script>DD_belatedPNG.fix('a,img');</script>
<![endif]-->
</head>
<body>
<?php include_once(VIEWPATH."public/header.php");?>
<div class="mainbody" id="mainbody">
    <div class="container mrgB30">
        <div class="member clearfix">
            <?php include_once(VIEWPATH."m/public/left_menu.php");?>
            <div class="fr uc_content">
            	<?php include_once(VIEWPATH."m/public/notice.php");?>
                <div class="clearfix uitopg">
                    <div class="authent">
                        <div class="aut_bti">推荐用户</div>
                        <div class="brotop">
                        	<input type="text" class="input" value="<?=$recommend_url?>" style="width:300px;padding:6px;background:#f6f7fb;border:1px solid #dbdbde;float:left;"/>
                        	<a href="#none" class="copy-input" style="border:1px solid #dbdbde;padding:5px;float:left;">复制</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="help_bottom"></div>
    </div> 
</div>
<!--mainbody-->
<?php include_once(VIEWPATH."public/footer.php");?>
</body>
<script type="text/javascript" src="<?=_get_cfg_path('js')?>jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="<?=_get_cfg_path('js')?>common.js"></script>
<script type="text/javascript">
$(function () {
	$(".copy-input").click(function(){
	    var Url=$(".input").val();
	    copyToClipboard(Url);
	 });
});

function copyToClipboard(maintext){
  	if (window.clipboardData){
    	window.clipboardData.setData("Text", maintext);
    	alert('已复制到前贴板!');
    }else if (window.netscape){
      	try{
        	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    	}catch(e){
    		$(".input").select();
        	alert("该浏览器不支持一键复制！请手工复制文本框链接地址～");
    	}
	    var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
	    if (!clip) return;
	    var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
	    if (!trans) return;
	    trans.addDataFlavor('text/unicode');
	    var str = new Object();
	    var len = new Object();
	    var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
	    var copytext=maintext;
	    str.data=copytext;
	    trans.setTransferData("text/unicode",str,copytext.length*2);
	    var clipid=Components.interfaces.nsIClipboard;
	    if (!clip) return false;
	    clip.setData(trans,null,clipid.kGlobalClipboard);
	    alert('已复制到前贴板!');
	}
    else
    {
    	$(".input").select();
    	alert("该浏览器不支持一键复制！请手工复制文本框链接地址～");
    }
// 	alert("以下内容已经复制到剪贴板nn" + maintext);
}
</script>
</html>